Adding Font Sizes and Names to the Menu
Adding Font Sizes and Names to the Menu
Here are some things you should do to accommodate the new font sizes:
Support all font sizes. The 127-point size limit no longer exists for
outline or bitmapped fonts and should be removed from your
application. The maximum point size on the QuickDraw coordinate
plane is 32,767 points.
Provide a small list of the most useful point sizes. For the menu
where your application displays font sizes, you shouldn't predefine a
static list of sizes available to the user or allow the default to be every
possible font size, because outline fonts can produce thousands of sizes.
Provide a method of increasing or decreasing the point size by one
point at a time. You can add a Larger or Smaller command, which makes
choosing slightly different sizes for outline fonts easier for the user.
Also, the user should be able to choose any possible point size at any
time in a simple manner.
Place a check next to the active size. This is how most applications
now indicate the active size.
Display available font sizes in outline style. With bitmapped fonts, the
RealFont function returns TRUE if the font is available in that point
size and FALSE if the font is not. However, be careful with outline
fonts. The font's designer may decide that there is a lower limit to the
point sizes at which the font looks accep table. The RealFont function
returns FALSE for an outline font if the size requested is smaller than
this lower value.
The following figure shows one possible method of doing these things.
A sample Size menu and font size dialog box
Use the AddResMenu procedure to create a menu that displays font names.
The AddResMenu procedure ensures that any changes to the
Font Manager do not affect your application and the menu that displays font
names is not dependent on how fonts are stored in your system software. The
AddResMenu procedure is documented in the
Menu Manager.